package com.kehutong.wxapi.response;

import org.coraframework.json.annotation.JSONField;

import java.util.List;

/**
 * 企业和第三方应用可通过此接口获取企业与成员的群发记录响应对象
 * @author: liukunlong
 * @date: 2021-03-05 10:27
 */
public class GetGroupMsgListResponse {

    /**
     * errcode
     */ /**
     * errcode : 0
     * errmsg : ok
     * next_cursor : CURSOR
     * group_msg_list : [{"msgid":"msgGCAAAXtWyujaWJHDDGi0mAAAA","creator":"xxxx","create_time":"xxxx","create_type":1,"text":{"content":"文本消息内容"},"image":{"media_id":"WWCISP_XXXXXXX"},"link":{"title":"消息标题","picurl":"https://example.pic.com/path","desc":"消息描述","url":"https://example.link.com/path"},"miniprogram":{"title":"消息标题","appid":"wx8bd80126147dfAAA","page":"/path/index.html"},"video":{"media_id":"WWCISP_XXXXXXX"}}]
     */

    @JSONField(name = "errcode")
    private Integer errcode;
    /**
     * errmsg
     */
    @JSONField(name = "errmsg")
    private String errmsg;
    /**
     * nextCursor
     */
    @JSONField(name = "next_cursor")
    private String nextCursor;
    /**
     * groupMsgList
     */
    @JSONField(name = "group_msg_list")
    private List<GroupMsgListDTO> groupMsgList;

    public Integer getErrcode() {
        return errcode;
    }

    public void setErrcode(Integer errcode) {
        this.errcode = errcode;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    public String getNextCursor() {
        return nextCursor;
    }

    public void setNextCursor(String nextCursor) {
        this.nextCursor = nextCursor;
    }

    public List<GroupMsgListDTO> getGroupMsgList() {
        return groupMsgList;
    }

    public void setGroupMsgList(List<GroupMsgListDTO> groupMsgList) {
        this.groupMsgList = groupMsgList;
    }

    public static class GroupMsgListDTO {
        /**
         * msgid
         */ /**
         * msgid : msgGCAAAXtWyujaWJHDDGi0mAAAA
         * creator : xxxx
         * create_time : xxxx
         * create_type : 1
         * text : {"content":"文本消息内容"}
         * image : {"media_id":"WWCISP_XXXXXXX"}
         * link : {"title":"消息标题","picurl":"https://example.pic.com/path","desc":"消息描述","url":"https://example.link.com/path"}
         * miniprogram : {"title":"消息标题","appid":"wx8bd80126147dfAAA","page":"/path/index.html"}
         * video : {"media_id":"WWCISP_XXXXXXX"}
         */

        @JSONField(name = "msgid")
        private String msgid;
        /**
         * creator
         */
        @JSONField(name = "creator")
        private String creator;
        /**
         * createTime
         */
        @JSONField(name = "create_time")
        private String createTime;
        /**
         * createType
         */
        @JSONField(name = "create_type")
        private Integer createType;
        /**
         * text
         */
        @JSONField(name = "text")
        private TextDTO text;
        /**
         * image
         */
        @JSONField(name = "image")
        private ImageDTO image;
        /**
         * link
         */
        @JSONField(name = "link")
        private LinkDTO link;
        /**
         * miniprogram
         */
        @JSONField(name = "miniprogram")
        private MiniprogramDTO miniprogram;
        /**
         * video
         */
        @JSONField(name = "video")
        private VideoDTO video;

        public String getMsgid() {
            return msgid;
        }

        public void setMsgid(String msgid) {
            this.msgid = msgid;
        }

        public String getCreator() {
            return creator;
        }

        public void setCreator(String creator) {
            this.creator = creator;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public Integer getCreateType() {
            return createType;
        }

        public void setCreateType(Integer createType) {
            this.createType = createType;
        }

        public TextDTO getText() {
            return text;
        }

        public void setText(TextDTO text) {
            this.text = text;
        }

        public ImageDTO getImage() {
            return image;
        }

        public void setImage(ImageDTO image) {
            this.image = image;
        }

        public LinkDTO getLink() {
            return link;
        }

        public void setLink(LinkDTO link) {
            this.link = link;
        }

        public MiniprogramDTO getMiniprogram() {
            return miniprogram;
        }

        public void setMiniprogram(MiniprogramDTO miniprogram) {
            this.miniprogram = miniprogram;
        }

        public VideoDTO getVideo() {
            return video;
        }

        public void setVideo(VideoDTO video) {
            this.video = video;
        }

        public static class TextDTO {
            /**
             * content
             */ /**
             * content : 文本消息内容
             */

            @JSONField(name = "content")
            private String content;

            public String getContent() {
                return content;
            }

            public void setContent(String content) {
                this.content = content;
            }
        }

        public static class ImageDTO {
            /**
             * mediaId
             */ /**
             * media_id : WWCISP_XXXXXXX
             */

            @JSONField(name = "media_id")
            private String mediaId;

            public String getMediaId() {
                return mediaId;
            }

            public void setMediaId(String mediaId) {
                this.mediaId = mediaId;
            }
        }

        public static class LinkDTO {
            /**
             * title
             */ /**
             * title : 消息标题
             * picurl : https://example.pic.com/path
             * desc : 消息描述
             * url : https://example.link.com/path
             */

            @JSONField(name = "title")
            private String title;
            /**
             * picurl
             */
            @JSONField(name = "picurl")
            private String picurl;
            /**
             * desc
             */
            @JSONField(name = "desc")
            private String desc;
            /**
             * url
             */
            @JSONField(name = "url")
            private String url;

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getPicurl() {
                return picurl;
            }

            public void setPicurl(String picurl) {
                this.picurl = picurl;
            }

            public String getDesc() {
                return desc;
            }

            public void setDesc(String desc) {
                this.desc = desc;
            }

            public String getUrl() {
                return url;
            }

            public void setUrl(String url) {
                this.url = url;
            }
        }

        public static class MiniprogramDTO {
            /**
             * title
             */ /**
             * title : 消息标题
             * appid : wx8bd80126147dfAAA
             * page : /path/index.html
             */

            @JSONField(name = "title")
            private String title;
            /**
             * appid
             */
            @JSONField(name = "appid")
            private String appid;
            /**
             * page
             */
            @JSONField(name = "page")
            private String page;

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getAppid() {
                return appid;
            }

            public void setAppid(String appid) {
                this.appid = appid;
            }

            public String getPage() {
                return page;
            }

            public void setPage(String page) {
                this.page = page;
            }
        }

        public static class VideoDTO {
            /**
             * mediaId
             */ /**
             * media_id : WWCISP_XXXXXXX
             */

            @JSONField(name = "media_id")
            private String mediaId;

            public String getMediaId() {
                return mediaId;
            }

            public void setMediaId(String mediaId) {
                this.mediaId = mediaId;
            }
        }
    }
}
